<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<style>
</style>
<script type="text/javascript">
    $(function() {
     $('#articleTypeEditPid').combotree({
            url : '${path}/articleType/tree?flag=false',
            parentField : 'pid',
            lines : true,
            panelHeight : 'auto',
            value :'${articleType.pid}'
        });
        $('#articleTypeEditForm').form({
            url : '${path}/articleType/edit',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    showMsg(result.msg);
                    parent.$.modalDialog.openner_treeGrid.treegrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    var form = $('#articleTypeEditForm');
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
    });
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" title="" style="overflow-x:hidden;overflow-y: auto;padding: 3px;">
        <form id="articleTypeEditForm" method="post">
             <table class="grid">
<input type="hidden" name="id" value="${articleType.id}">
 <tr>
<%-- <td>图标</td>
                     <td>
                                            <input name='iconCls' id='iconCls'  type='text' placeholder='请输入图标' class='easyui-text-2  span2' value='${articleType.iconCls}'>
                                     </td> --%>
                     <td>名称</td>
                     <td>
                        <input name='name' id='name'  type='text' placeholder='请输入名称' class='easyui-text-2  span2' value='${articleType.name}'>
                  </td>
        <%--           </tr> <tr>
<td>父类ID</td>
                     <td>
                                            <input name='pid' id='pid'  type='text' placeholder='请输入父类ID' class='easyui-text-2  span2' value='${articleType.pid}'>
                                     </td> --%>
                     <td>排序</td>
                     <td>
                        <input name='seq' id='seq'  type='text' placeholder='请输入排序' class='easyui-text-2  span2' value='${articleType.seq}'>
                  </td>
                  </tr>
                  <tr>
                   <td>图标</td>
                	<td colspan="3">
                	<input type="text" class="easyui-text-2" name="iconCls" value="${articleType.iconCls}"/>
                </td>
                  </tr>
 				<tr>
                <td>上级</td>
                    <td colspan="3">
                    <input type="hidden" name="pid" id="articleTypeEdit_pid" value="${articleType.pid}">
                    <input type="text" class="easyui-text-2" name="pName" id="articleTypeEdit_pid_disp" value="${articleType.pName}">
                    <a class="easyui-linkbutton" href="javascript:void(0)" onclick="selectArticleType(false,'articleTypeEdit_pid','articleTypeEdit_pid_disp')" >选择</a>
                    <a class="easyui-linkbutton" href="javascript:void(0)" onclick="clearDisp('articleTypeEdit_pid','articleTypeEdit_pid_disp')" >清除</a>
                    </td>
            </tr>
            </table>
        </form>
    </div>
</div>